package com.cloud.poetry.core.config;

import com.cloud.poetry.core.interceptor.GatewayInterceptor;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author mengxj
 */
@Component
public class InterceptorConfig implements WebMvcConfigurer {

    @Resource
    private GatewayInterceptor gatewayInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(gatewayInterceptor);
    }
}
